<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container1{
            width: 100%;
            color: red;
        }

        .container2{
            color:blue;
        }

         a{
            color: inherit;
            text-decoration: none;
        }
        
    </style>
</head>
<body>
    <div class="container1">
      <a href="">百度</a>
      <p>一个段落</p>
    </div>

    <div class="container2">
      <a href="">百度</a>
      <p>一个段落</p>
    </div>
</body>
</html>